import java.util.Scanner;

public class D1 {
    public static void main(String[] args) {
        for (int i = 0; i < 1000; i++) {
            int j=i/100;
            int k=i%100/10;
            int l=i%10;
           if(i==j*j*j+k*k*k+l*l*l){
               System.out.println(i+"是水仙花术");
           }
        }
    }
}
